package com.imachen.ymcc.fegin;

import com.imachen.ymcc.fallback.MediaFileFeignClienFallbackFactory;
import com.imachen.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(contextId = "mediaFile" ,value = "service-media" , fallbackFactory = MediaFileFeignClienFallbackFactory.class)
public interface MediaFileFeignClien {

    @RequestMapping(value = "/mediaFile/getMediaFileByCourseId/{courseId}",method = RequestMethod.GET)
    JSONResult getMediaFileByCourseId(@PathVariable("courseId") Long courseId);

}
